import request from '@/utils/request'
//获取所有用户角色
export function getAllAdminRole() {
  return request({
    url: '/menuMange/getAllAdminRole',
    method: 'get',
  })
}
//添加和更新角色
export function addOrUpdateAdminRole(data) {
  return request({
    url: '/menuMange/addOrUpdateAdminRole',
    method: 'post',
    data,
  })
}
//删除用户角色
export function deleteAdminRole(data) {
  return request({
    url: '/menuMange/deleteAdminRole',
    method: 'post',
    data,
  })
}
//菜单角色映射
export function addOrUpdateMenuRoleMap(data) {
  return request({
    url: '/menuMange/addOrUpdateMenuRoleMap',
    method: 'post',
    data,
  })
}
//
//获取菜单角色映射
export function getMap(id) {
  return request({
    url: '/menuMange/getMenuIdByRoleId',
    method: 'get',
    params: { roleId: id },
  })
}
